import ReactDOM from 'react-dom'
import { persistStore } from 'redux-persist'

import { ConfigProvider as AntdProvider } from 'antd'
import { Provider as ReduxProvider } from 'react-redux'
import { PersistGate as PersistProvider } from 'redux-persist/lib/integration/react'

import Router from '@/routes'
import Store from '@/models/store'

import zhCN from 'antd/lib/locale/zh_CN'

import '@/assets/less/base.less'

ReactDOM.render(
  <AntdProvider locale={zhCN}>
    <ReduxProvider store={Store}>
      <PersistProvider loading={null} persistor={persistStore(Store)}>
        <Router />
      </PersistProvider>
    </ReduxProvider>
  </AntdProvider>,
  document.getElementById('root')
)
